package com.wfl.sampling.service.impl;

import com.wfl.sampling.dao.ShadowDao;
import com.wfl.sampling.entity.DialogDo;
import com.wfl.sampling.entity.ShadowDo;
import com.wfl.sampling.service.ShadowService;
import javafx.scene.effect.Shadow;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.*;
import java.util.stream.Collectors;

@Service
public class ShadowServiceImpl implements ShadowService {
    @Resource
    private ShadowDao shadowMapper;
    @Override
    public ArrayList<ShadowDo> getShadowByUserId(Integer userId) {
        return shadowMapper.selectShadowByUserId(userId);
    }
    @Override
    public ShadowDo getShadowInfoById(Integer shadowId) {
        return shadowMapper.selectShadowInfoById(shadowId);
    }
    @Override
    public void saveShadowInfo(ShadowDo shadowDo) {
        shadowMapper.saveShadowInfo(shadowDo);
    }

    @Override
    public void insertShadowInfo(ShadowDo shadowDo) {
        shadowMapper.insertShadowInfo(shadowDo);
    }

    @Override
    public void deleteShadowInfo(Integer shadowId) {
        shadowMapper.deleteShadowById(shadowId);
    }

    @Override
    public void saveDialogInfo(DialogDo dialogDo) {
        shadowMapper.saveDialogInfo(dialogDo);
    }
}
